<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     	<!--<include src="../common/pre/header.html"></include>-->

	    <title>易买网</title>
	</head>
<body>

<div class="sss"></div>

		<!--Begin Header Begin-->
		<include  src="../common/pre/searchBar.html"></include>
		<!--End Header End-->
		<!--Begin Menu Begin-->
		<div class="menu_bg">
		    <div class="menu">
		        <!--Begin 商品分类详情 Begin-->
		        <div class="nav">
		            <div class="nav_t">全部商品分类</div>
		            <div class="leftNav">
		                <ul>
		                    <!--<c:forEach items="${productCategoryVoList}" var="temp">-->
		                        
		                   <!-- </c:forEach>-->
		                </ul>
		            </div>
		        </div>
		        <ul class="menu_r">
		            <li><a href="../Home?action=index">首页</a></li>
		          <!--  <c:forEach items="${productCategoryVoList}" var="temp">
		                <li>
		                    <a href="../Product?action=queryProductList&level=1&category=${temp.productCategory.id}">${temp.productCategory.name}</a>
		                </li>
		            </c:forEach>-->
		        </ul>
		        <div class="m_ad">中秋送好礼！</div>
		        <!--End 商品分类详情 End-->
		    </div>
		</div>
		<!--End Menu End-->
		<div class="i_bg bg_color">
		    <div class="i_ban_bg">
		        <!--Begin Banner Begin-->
		        <div class="banner">
		            <div class="top_slide_wrap">
		                <ul class="slide_box bxslider">
		                    <li><img src="../statics/images/ban1.jpg" width="740" height="401"/></li>
		                    <li><img src="../statics/images/ban1.jpg" width="740" height="401"/></li>
		                    <li><img src="../statics/images/ban1.jpg" width="740" height="401"/></li>
		                </ul>
		                <div class="op_btns clearfix">
		                    <a href="#" class="op_btn op_prev"><span></span></a>
		                    <a href="#" class="op_btn op_next"><span></span></a>
		                </div>
		            </div>
		        </div>
		      	<!--<script type="text/javascript">
		            var jq2 = jQuery.noConflict();
		            (function () {
		                $(".bxslider").bxSlider({
		                    auto: true,
		                    prevSelector: jq2(".top_slide_wrap .op_prev")[0], nextSelector: jq2(".top_slide_wrap .op_next")[0]
		                });
		            })();
		        </script>-->
		        <!--End Banner End-->
		        <div class="inews">
		            <div class="news_t">
		                <span class="fr"><a href="../admin/news?action=queryNewsList">更多 ></a></span>新闻资讯
		            </div>
		            <ul>
		                <!--<c:forEach items="${news}" var="temp">
		                    <li><span>[ 公告 ]</span>
		                        <a href="../admin/news?action=newsDeatil&id=${temp.id}">${temp.title}</a>
		                    </li>
		                </c:forEach>-->
		            </ul>
		            <div class="charge_t">
		                话费充值
		                <div class="ch_t_icon"></div>
		            </div>
		            <form>
		                <table border="0" style="width:205px; margin-top:10px;" cellspacing="0" cellpadding="0">
		                    <tr height="35">
		                        <td width="33">号码</td>
		                        <td><input type="text" value="" class="c_ipt"/></td>
		                    </tr>
		                    <tr height="35">
		                        <td>面值</td>
		                        <td>
		                            <select class="jj" name="city">
		                                <option value="0" selected="selected">100元</option>
		                                <option value="1">50元</option>
		                                <option value="2">30元</option>
		                                <option value="3">20元</option>
		                                <option value="4">10元</option>
		                            </select>
		                            <span style="color:#ff4e00; font-size:14px;">￥99.5</span>
		                        </td>
		                    </tr>
		                    <tr height="35">
		                        <td colspan="2"><input type="submit" value="立即充值" class="c_btn"/></td>
		                    </tr>
		                </table>
		            </form>
		        </div>
		    </div>
		    <div class="content mar_20">
		        <img src="../statics/images/mban_1.jpg" width="1200" height="110"/>
		    </div>
		    <!--Begin 进口 生鲜 Begin-->
		    <div id="st"></div>
		  
		    <include src="../common/pre/footer.html"></include>
		</div>
	
	</body>
	<script src="../statics/js/include.js"></script>
	<script type="text/javascript" src="../statics/js/jquery-3.5.1.js" ></script>
	<script type="text/javascript" src="../statics/js/common/jquery.bxslider_e88acd1b.js"></script>
	<script type="application/javascript">
		$(function () {
			$('.sss').load("../common/pre/header.html");		
			fl();
			gg();
			
		 });
		 
		 

		
		 //查询分类
		 function fl(){
		 	$.ajax({
		 		type:"get",
		 		url:"http://localhost:8080/ProductCategory/",
/*		 		data:{parentId:0},*/
		 		dataType:"json",
		 		success:function(data){
		 			var t1;
	                var list=data.obj;
	                
	                
	  	            //循环拼凑每一行的数据到表格
	                for(var i=0;i<list.length;i++){
	                	//首页一级
	                	var st1='<div class="i_t mar_10">'+
            '<span class="floor_num">'+(i+1)+'F</span>'+
            '<span class="fl">'+list[i].name+'</span>'+
        '</div>'+
        '<div class="content">'+
            '<div class="fresh_left">'+
             '   <div class="fre_ban">'+
              '      <div id="imgPlay1">'+
               '         <ul class="imgs" id="actor1">'+
                '            <li><a href="#"><img src="../statics/images/fre_r.jpg" width="211" height="286"/></a>'+
                 '           </li>'+
                            '<li><a href="#"><img src="../statics/images/fre_r.jpg" width="211" height="286"/></a>'+
                            '</li>'+
                            '<li><a href="#"><img src="../statics/images/fre_r.jpg" width="211" height="286"/></a>'+
                            '</li>'+
                       ' </ul>'+
                        '<div class="prevf">上一张</div>'+
                       ' <div class="nextf">下一张</div>'+
                   ' </div>'+
               ' </div>'+
                '<div class="fresh_txt">'+
                 '   <div class="fresh_txt_c">';
	                	
	                	
	                	//一级菜单
  	                    t1='<li><div class="fj"><span class="n_img"><span></span></span><span class="fl">'+list[i].name+'</span></div><div class="zj"><div class="zj_l">'
  	                    var t2='';
  	                    
  	                    //首页
  	                    var t4='<li>'+
                    '<a href="#">'+list[i].name+'</a>'+
                '</li>'
  	                    $(".menu_bg .menu_r").append(t4);
  	                    var st2='';
  	                    var st3='';
  	                    
  	                    //DOM方式追加到最后1行的前面
	                    var list2=list[i].zl;
	                   
	                    
  	                    for (var j=0; j<list2.length;j++) {
  	                    	//首页二级
  	                    	st2+='<a href="${ctx}/Product?action=queryProductList&category=${vo.productCategory.id}&level=2">'+list2[j].name+'</a>';
  	                    	
  	                    	
  	                    	//二级菜单
                			t2+='<div class="zj_l_c"><h2><a href="#">'+list2[j].name+'</a></h2>'
                			var list3=list2[j].zl;
                			var t3='';
             	  	        for (var k=0;k<list3.length;k++) {
             	  	        	var slist=list3[k].products;
             	  	        	//三级菜单
             	  	        	

                       			t3+='<a href="#">'+list3[k].name+'</a>';
                       			for(var l=0;l<slist.length;l++){
                       		
                       				st3+='<li>'+
                            '<div class="name"><a href="#">'+slist[l].name+'</a></div>'+
                            '<div class="price">'+
                            '    <font>￥<span>'+slist[l].price+'</span></font> &nbsp;'+
                         '   </div>'+
                          '  <div class="img">'+
                          '      <a href="${ctx}/Product?action=queryProductDeatil&id=${productVo.id}">'+
                               '     <img src="../files/'+slist[l].fileName+'" width="185" height="155"/>'+
                           '     </a>'+
                        '    </div>'+
                      '  </li>';                    			
                       			}
                       		
				        
                    		}
             	  	        
             	  	        t2+=t3;
             	  	        t2+='</div>';
             	  	        
             	  	        
  	                    }
  	                    st1+=st2+'</div>'+
				                '</div>'+
				       '     </div>'+
				            '<div class="fresh_mid">'+
				               ' <ul>'+st3;
  	                    st1+=' </ul>'+
          '   </div>'+
           '  <div class="fresh_right">'+
           '      <ul>'+
               '      <li><a href="#"><img src="../statics/images/fre_b1.jpg" width="260" height="220"/></a></li>'+
             '        <li><a href="#"><img src="../statics/images/fre_b2.jpg" width="260" height="220"/></a></li>'+
             '    </ul>'+
       '      </div>'+
     '    </div>';
  	                    t1+=t2;
  	                    t1+='</div></div></li>';
						$(".leftNav ul").append(t1);
						$("#st").append(st1);
	           		}
		 		}
		 	});
		}
		//公告
		function gg(){
			$.ajax({
				type:"get",
				data:{pageNum:1},
				url:"http://localhost:8080/news/",
				dataType:"JSON",
				success:function(data){
					var list = data.obj;
					for (var i = 0; i < list.length; i++) {
						var title = list[i].title;
						var t = '<li><span>[ 公告 ]</span>' +
							'<a href="#">' + title + '</a>' +
							'</li>';
						$(".inews ul").append(t);

					}
				}
			})
		}
		
		
		
		//注销
		function logout(){
			sessionStorage.removeItem("userName");
			location.href="login.html";
			
		}
		
		
		
	</script>

</html>
